#pragma once

#include "RenderCommand.h"
#include "RendererAPI.h"
#include "OrthographicCamera.h"
#include "Shader.h"
/*
 * 渲染主类
 * 各类渲染接口初始化
 * 绑定着色器，Submit给着色器添加变量 绑定顶点 执行Draw画
 * */
namespace Hazel {

    class Renderer
    {
    public:
        static void Init();
        static void Shutdown();
        static void BeginScene(OrthographicCamera& camera);
        static void EndScene();

        static void Submit(const Ref<Shader>& shader,const Ref<VertexArray>& vertexArray,
                           const glm::mat4& transform = glm::mat4(1.0f));

        inline static RendererAPI::API GetAPI() { return RendererAPI::GetAPI(); }

        struct SceneDatta {
            glm::mat4 ViewProjectionMatrix;
        };

        static SceneDatta* m_SceneData;
        static void OnWindowResize(uint32_t width, uint32_t height);
    };
}
